document.addEventListener("DOMContentLoaded", function(){
	document.getElementById("releaseNeeds").addEventListener("click", function(){
		var title=document.getElementById("Needtitle").value;
		var description=document.getElementById("NeedDes").value;
		
		if(title==null||title==""||description==null||description==""){
			alert("有空框");
			return;
		}
		 $.post("needs!addNeeds.action",{"needs.title":title,"needs.describe":description},function(data,textStatus){
			 document.getElementById("closeSelf").click();
			 if(data==1)
			 $("#needsResultBody").html("<label class=\"col-bg-2 control-label\">需求发布成功</label>");
			 else
				 $("#needsResultBody").html("<label class=\"col-bg-2 control-label\">需求发布失败</label>"); 
				$("#needsResult").modal();
				 
		 });
	}, false);
}, false);